package ba05_After;

import org.springframework.stereotype.Component;

/**
 * @author HLF
 * @version V1.0
 * @package service.impl
 * @date 2021/10/17 10:03
 */

@Component//创建目标类对象
public class SomeServiceImpl implements SomeService {
    @Override
    public void doSome(String name, Integer age) {
        System.out.println("执行了SomeServiceImpl的doSome方法！");
    }

    @Override
    public void doSecond() {
        System.out.println("执行了SomeServiceImpl的doSecond方法" + (10 / 0));
    }

    @Override
    public void doThird() {
        //无论什么时候都会执行，尽管抛出异常依然会执行
        //System.out.println("执行了SomeServiceImpl的doThird方法" + (10 / 0));
        System.out.println("执行了SomeServiceImpl的doThird方法");
    }
}
